Optimal. Leaf size=39 \[ x \left (a^2-b^2\right )-\frac {2 a b \log (\cos (c+d x))}{d}+\frac {b^2 \tan (c+d x)}{d} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.06, antiderivative size = 39, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 3, integrand size = 28, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.107, Rules used = {3086, 3477, 3475} \[ x \left (a^2-b^2\right )-\frac {2 a b \log (\cos (c+d x))}{d}+\frac {b^2 \tan (c+d x)}{d} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 3086
Rule 3475
Rule 3477
Rubi steps
\begin {align*} \int \sec ^2(c+d x) (a \cos (c+d x)+b \sin (c+d x))^2 \, dx &=\int (a+b \tan (c+d x))^2 \, dx\\ &=\left (a^2-b^2\right ) x+\frac {b^2 \tan (c+d x)}{d}+(2 a b) \int \tan (c+d x) \, dx\\ &=\left (a^2-b^2\right ) x-\frac {2 a b \log (\cos (c+d x))}{d}+\frac {b^2 \tan (c+d x)}{d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [C] time = 0.14, size = 69, normalized size = 1.77 \[ \frac {2 b^2 \tan (c+d x)-i \left ((a+i b)^2 \log (-\tan (c+d x)+i)-(a-i b)^2 \log (\tan (c+d x)+i)\right )}{2 d} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.52, size = 60, normalized size = 1.54 \[ \frac {{\left (a^{2} - b^{2}\right )} d x \cos \left (d x + c\right ) - 2 \, a b \cos \left (d x + c\right ) \log \left (-\cos \left (d x + c\right )\right ) + b^{2} \sin \left (d x + c\right )}{d \cos \left (d x + c\right )} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.21, size = 44, normalized size = 1.13 \[ \frac {a b \log \left (\tan \left (d x + c\right )^{2} + 1\right ) + b^{2} \tan \left (d x + c\right ) + {\left (a^{2} - b^{2}\right )} {\left (d x + c\right )}}{d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 3.74, size = 57, normalized size = 1.46 \[ a^{2} x -b^{2} x +\frac {b^{2} \tan \left (d x +c \right )}{d}-\frac {2 a b \ln \left (\cos \left (d x +c \right )\right )}{d}+\frac {a^{2} c}{d}-\frac {c \,b^{2}}{d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 0.43, size = 49, normalized size = 1.26 \[ \frac {{\left (d x + c\right )} a^{2} - {\left (d x + c - \tan \left (d x + c\right )\right )} b^{2} - a b \log \left (-\sin \left (d x + c\right )^{2} + 1\right )}{d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 0.68, size = 118, normalized size = 3.03 \[ \frac {b^2\,\mathrm {tan}\left (c+d\,x\right )}{d}+\frac {2\,a^2\,\mathrm {atan}\left (\frac {\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}\right )}{d}-\frac {2\,b^2\,\mathrm {atan}\left (\frac {\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}\right )}{d}-\frac {2\,a\,b\,\ln \left (\frac {\cos \left (c+d\,x\right )}{\cos \left (c+d\,x\right )+1}\right )}{d}+\frac {2\,a\,b\,\ln \left (\frac {1}{{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2}\right )}{d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int \left (a \cos {\left (c + d x \right )} + b \sin {\left (c + d x \right )}\right )^{2} \sec ^{2}{\left (c + d x \right )}\, dx \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________